/**
 * 
 */
package fr.toto.menuitem;

import java.awt.Desktop;
import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import javax.swing.JMenuItem;
import javax.swing.JOptionPane;

import fr.toto.constantes.Constantes;

/**
 * @author tshepo
 * 
 */
public class BetaSeriesMenuItem extends JMenuItem implements Constantes {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4360806601558691052L;

	/**
	 * @throws HeadlessException
	 */
	public BetaSeriesMenuItem() {
		super(MESSAGES.getString("BetaSeriesMI"));

		this.addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent e) {

				URI uri = null;
				try {
					uri = new URI(BetaSeriesURI);
				} catch (URISyntaxException e1) {
					JOptionPane.showMessageDialog(null, e1.getStackTrace()
							.toString());
				}
				try {
					Desktop.getDesktop().browse(uri);
				} catch (IOException e1) {
					JOptionPane.showMessageDialog(null, e1.getStackTrace()
							.toString());
				}

			}
		});

	}

	/**
	 * @param arg0
	 * @throws HeadlessException
	 */
	public BetaSeriesMenuItem(String arg0) {
		this();
	}

}
